package the.workshop.milktea.service;

import org.springframework.stereotype.Service;
import the.workshop.milktea.infrastructure.mapper.IngredientCollectMapper;
import the.workshop.milktea.infrastructure.model.IngredientCollect;
import the.workshop.milktea.interfaces.resp.IngredientCollectReportResp;

import javax.annotation.Resource;
import java.util.List;

@Service
public class IngredientCollectService {

    @Resource
    private IngredientCollectMapper ingredientCollectMapper;

    public boolean add(IngredientCollect data) {
        ingredientCollectMapper.insert(data);
        return true;
    }

    public List<IngredientCollectReportResp> report() {
        return ingredientCollectMapper.getReport();
    }
}
